-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(video): add support for video ad volume control #613
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #613 +/- ##
==========================================
- Coverage 43.72% 43.26% -0.45%
==========================================
Files 30 31 +1
Lines 549 571 +22
Branches 151 155 +4
==========================================
+ Hits 240 247 +7
- Misses 309 324 +15 |
__tests__/googleMobileAds.test.ts
Outdated
it('throws if setAppVolume is greater then 1', function () { | ||
expect(() => { | ||
admob().setAppVolume(2); | ||
}).toThrowError('The app volume must be a value between 0 and 1 inclusice.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo inclusice
src/MobileAds.ts
Outdated
|
||
setAppVolume(volume: number) { | ||
if (volume < 0 || volume > 1) | ||
throw new Error('The app volume must be a value between 0 and 1 inclusice.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo inclusice
Nice addition! |
__tests__/googleMobileAds.test.ts
Outdated
expect(RNGoogleMobileAdsModule.setAppVolume).toBeCalledTimes(1); | ||
}); | ||
|
||
it('throws if setAppVolume is greater then 1', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
greater than 1
|
docs/displaying-ads.mdx
Outdated
@@ -484,3 +484,38 @@ function App() { | |||
``` | |||
|
|||
The `sizes` prop takes an array of [`BannerAdSize`](/reference/admob/banneradsize) types. | |||
|
|||
### Video ad volume control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should place this under 'Advanced Usage'
Thanks for the review. I've corrected the spelling mistakes and updated the doc. |
I meant under the "Section" Advanced Usage.
|
Sorry, I didn't have the latest version of the branch. So I didn't quite understand what you were asking me. 😄 |
Awesome, thanks for making this library better :) |
🎉 This PR is included in version 14.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
I need to be able to control the volume of ads in my application.
Here's the documentation for volume control: Video ad volume control
Related issues
Fixes #580
Release Summary
Implement Video ad volume control
Checklist
and followed the process outlined there for submitting PRs.
Android
iOS
e2e
tests added or updated in__tests__e2e__
jest
tests added or updated in__tests__
Test Plan
Think
react-native-google-mobile-ads
is great? Please consider supporting the project with any of the below:Invertase
on Twitter